.navbar.navbar-default
  .container
    .navbar-header
      a.navbar-brand(href="/") 熟悉的人

      ul.nav.navbar-nav
        li.dropdown
          a(href="#" class="dropdown-toggle" data-toggle="dropdown") Movie
            span.caret
          ul.dropdown-menu(role="menu")
            li
              a(href="/admin/movie/list") list
            li
              a(href="/admin/movie/new") new
        li.dropdown
          a(href="#" class="dropdown-toggle" data-toggle="dropdown") User
            span.caret
          ul.dropdown-menu(role="menu")
            li
              a(href="/admin/user/list") list

    if user
      p.navbar-text.navbar-right
          span 欢迎您,#{user.name}
          span &nbsp;|&nbsp;
          a.navbar-link(href="/logout") 登出
    else
      p.navbar-text.navbar-right
          a.navbar-link(href="#",data-toggle="modal" ,data-target="#signupModal") 注册
          span &nbsp;|&nbsp;
          a.navbar-link(href="#",data-toggle="modal" ,data-target="#signinModal") 登陆

    form.navbar-form.navbar-right(method='GET', action='/results')
      .input-group.pull-right
        input.form-control(type='text', name='q')
        span.input-group-btn
          button.btn.btn-default(type='submit') 搜索

#signupModal.modal.fade
  .modal-dialog
    .modal-content
      form(method="POST", action="/user/signup")
        .modal-header 注册
        .modal-body
          .form-group
            label(for="signupName") 用户名
            input#signupName.form-control(name="user[name]", type="text")
          .form-group
            label(for="signupPassword") 密码
            input#signupPassword.form-control(name="user[password]", type="text")
        .modal-footer
          button.btn.btn-default(type="button", data-dismiss="modal") 关闭
          button.btn.btn-success(type="submit") 提交

#signinModal.modal.fade
  .modal-dialog
    .modal-content
      form(method="POST", action="/user/signin")
        .modal-header 登陆
        .modal-body
          .form-group
            label(for="signinName") 用户名
            input#signinName.form-control(name="user[name]", type="text")
          .form-group
            label(for="signinPassword") 密码
            input#signinPassword.form-control(name="user[password]", type="text")
        .modal-footer
          button.btn.btn-default(type="button", data-dismiss="modal") 关闭
          button.btn.btn-success(type="submit") 提交
